Skip to content

Add WASM support - #1285

Closed
darrell-roberts wants to merge 4 commits into
getsentry:masterfrom
darrell-roberts:darrell/push-pvpyvptwvosp
Closed

Add WASM support#1285
darrell-roberts wants to merge 4 commits into
getsentry:masterfrom
darrell-roberts:darrell/push-pvpyvptwvosp

Conversation

@darrell-roberts

Copy link
Copy Markdown

Description

The SDK today can not be used with WASM targets. These changes work for my current utilization of the SDK but there are other things that need to change. The transport for example. I have a custom transport for our needs along with a WASM transport. I can add the WASM transport to this PR but for now I'd like to submit this to get started on the discussion/work to get WASM support in the SDK.

Issues

@darrell-roberts
darrell-roberts requested a review from a team as a code owner August 8, 2026 16:56
Comment thread sentry-types/Cargo.toml Outdated
Comment thread sentry-core/src/session.rs Outdated
Comment thread sentry-types/Cargo.toml Outdated
@darrell-roberts
darrell-roberts force-pushed the darrell/push-pvpyvptwvosp branch from 869964a to 6aca7ee Compare August 8, 2026 17:25
Comment thread sentry-time/src/lib.rs Outdated
Comment thread sentry-time/src/lib.rs
Comment thread sentry-time/src/lib.rs
@darrell-roberts
darrell-roberts force-pushed the darrell/push-pvpyvptwvosp branch from d3534d6 to 59bd9b6 Compare August 9, 2026 14:05
Comment thread sentry-time/Cargo.toml Outdated
@darrell-roberts
darrell-roberts force-pushed the darrell/push-pvpyvptwvosp branch from 59bd9b6 to df5a05f Compare August 9, 2026 15:16

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit df5a05f. Configure here.

..Default::default()
}
.into(),
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WASM cfg overly broad

Medium Severity

server_name and os_context gate on target_arch = "wasm32", which also matches targets like Emscripten where uname/hostname and real OS info previously worked. That regresses those targets to a hardcoded "WASM" OS and no server name. sentry-time already uses the narrower wasm + unknown cfg for browser-only limitations.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit df5a05f. Configure here.

@szokeasaurusrex

Copy link
Copy Markdown
Member

Hey @darrell-roberts 👋

I would like to reiterate our position from the previous discussion in #226 and my follow-up on #1100.

As I explained on #1100, that PR was intentionally kept closed because we do not currently have the capacity to review this work. Since this PR covers substantially the same feature, I am going to close it as well.

More generally, adding WASM support affects several core parts of the SDK. We want to ensure that the resulting implementation is something we can maintain and support, so we plan to investigate, design, and implement a solution ourselves. We are therefore not accepting external PRs for WASM support, so please refrain from opening any further WASM-support PRs.

Thanks again for your interest and for sharing your work 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants